package servlet.events;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Ex2_Handler extends EventHandler {
	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) 
		throws ServletException, IOException {
		
		String nom = request.getParameter("nom");
		String prenom = request.getParameter("prenom");
		
		PrintWriter out = response.getWriter();
		
		out.println("<html>");
		out.println("<head><title>Exercise 2 - GET></title></head>");
		out.println("<body>");
		out.println("Bonjour " + nom + " " + prenom + "!");
		out.println("</body>");
		out.println("</html>");
	}
}
